package com.web;

import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.test.web.servlet.setup.MockMvcBuilders.*;

public class HomeControllerTest {
	public void testHomePage(){
		HomeController controller = new HomeController();
		//搭建MockMvc
		MockMvc mockMvc = MockMvcBuilders.standaloneSetup(controller).build();
		//对“/”执行GET请求
		mockMvc.perform(get("/"));
	}
}
